*** Appendix 7a: Create regression tables for regressions on which Figures 2 is based
	*** Note: Latex code produced here was additionally edited by hand


	*** 1. section: Regressions
	*** 2. section: Export tables

use  data_long.dta, clear


*Define locals
local controls1 "age female educ_secondary educ_prof_high educ_acad_high i.exp"
local controls2a "authoritarian conspiracy_sum	know_sum	pred_bundes_gov_r	pred_Russia_r	" // for total sample
local controls2b "				conspiracy_sum	know_sum	pred_bundes_gov_r	pred_Russia_r	" // for for authoritarian beliefs
local controls2c "authoritarian					know_sum	pred_bundes_gov_r	pred_Russia_r	" // for conspiracy beliefs
local controls2d "authoritarian conspiracy_sum				pred_bundes_gov_r	pred_Russia_r	" // for knowledge
local controls2e "authoritarian conspiracy_sum know_sum 						pred_Russia_r	" // for att twd German gov
local controls2f "authoritarian conspiracy_sum know_sum		pred_bundes_gov_r					" // for att twd Russia



***************************************************************

*** Secion 1: Regressions

***************************************************************

*Average effect, all experiments
mixed poolexp i.treat_exp `controls1' `controls2a' || lfdn:, stddeviations
estimates store m1

*By authoritarian beliefs, all experiments
mixed poolexp i.treat_exp##c.authoritarian  `controls1' `controls2b' || lfdn:, stddeviations
estimates store m2

*By conspiracy theory beliefs, all experiments
mixed poolexp i.treat_exp##c.conspiracy_sum `controls1' `controls2c' || lfdn:, stddeviations
estimates store m3

*By political knowledge, all experiments
mixed poolexp i.treat_exp##c.know_sum `controls1' `controls2d' || lfdn:, stddeviations
estimates store m4

*By attitudes toward German government, all experiments
mixed poolexp i.treat_exp##c.pred_bundes_gov_r `controls1' `controls2e' || lfdn:, stddeviations
estimates store m5
mat list e(b)

*By attitudes toward Russia, experiments on foreign policy
mixed poolexp i.treat_exp##c.pred_Russia_r `controls1' `controls2f' || lfdn:, stddeviations
estimates store m6
mat list e(b)


***************************************************************

*** Secion 2: Export tables

***************************************************************

esttab 	m1 m2 m3 using "tableA17.tex", replace ///
		b(2) se(2) wide nogaps compress nobaselevels varwidth(15) ///
		modelwidth(6) nonumbers ///
		title("Regression table, ALL EXPERIMENTS (Part 1)") ///
		mtitles("M1" "M2" "M3") ///
		refcat(2.treat_exp "Group 1: Control") ///
		coeflabels(2.treat_exp "Group 2: Russian frame" ///
					3.treat_exp "Group 3: Russian frame, sourced" ///
					4.treat_exp "Group 4: Western frame" ///
					5.treat_exp "Group 5: Western frame, sourced" ///
					authoritarian "Authoritarian beliefs" ///
					conspiracy_sum "Belief in conspiracy theory" ///
					know_sum "Political knowledge" ///
					pred_bundes_gov_r "Attitude twd German government" ///
					pred_Russia_r "Attitude twd Russia" ///
					2.treat_exp#c.authoritarian "T2 * Authoritarian beliefs" ///
					3.treat_exp#c.authoritarian "T3 * Authoritarian beliefs" ///
					4.treat_exp#c.authoritarian "T4 * Authoritarian beliefs" ///
					5.treat_exp#c.authoritarian "T5 * Authoritarian beliefs" ///
					2.treat_exp#c.conspiracy_sum "T2 * Belief in conspiracy theory" ///
					3.treat_exp#c.conspiracy_sum "T3 * Belief in conspiracy theory" ///
					4.treat_exp#c.conspiracy_sum "T4 * Belief in conspiracy theory" ///
					5.treat_exp#c.conspiracy_sum "T5 * Belief in conspiracy theory" ///
					age "Age" ///
					female "Gender (female)" ///
					educ_secondary "Education dummy: Secondary education" ///
					educ_prof_high "Education dummy: Applied sciences high school" ///
					educ_acad_high "Education dummy: Academic high school" ///
					2.exp "Experiment dummy: NATO in Eastern Europe" ///
					3.exp "Experiment dummy: Democracy export to Ukraine" ///
					4.exp "Experiment dummy: Schengen treaty" ///
					5.exp "Experiment dummy: German media hold back facts to protect foreign law-breakers" ///
					6.exp "Experiment dummy: NATO commitment to support Turkey" ///
					7.exp "Experiment dummy: German government too lenient" ///
					8.exp "Experiment dummy: Russia Panama Papers" ///
					_cons "Constant") ///
		order(2.treat_exp 3.treat_exp 4.treat_exp 5.treat_exp authoritarian 2.treat_exp#c.authoritarian 3.treat_exp#c.authoritarian 4.treat_exp#c.authoritarian 5.treat_exp#c.authoritarian conspiracy_sum 2.treat_exp#c.conspiracy_sum 3.treat_exp#c.conspiracy_sum 4.treat_exp#c.conspiracy_sum 5.treat_exp#c.conspiracy_sum know_sum pred_bundes_gov_r pred_Russia_r age female educ_secondary educ_prof_high educ_acad_high 2.exp 3.exp 4.exp 5.exp 6.exp 7.exp 8.exp)  ///
		transform(ln*: exp(@) exp(@)) ///
		eqlabels("" "sd(Respondent)" "sd(Residual)", none) 


esttab 	m4 m5 m6 using "tableA18.tex", replace ///
		b(2) se(2) wide nogaps compress nobaselevels varwidth(15) ///
		modelwidth(6) nonumbers nodepvars ///
		title("Regression table, ALL EXPERIMENTS (Part 2)") ///
		mtitles("M4" "M5" "M6") ///
		refcat(2.treat_exp "Group 1: Control") ///
		coeflabels(2.treat_exp "Group 2: Russian frame" ///
					3.treat_exp "Group 3: Russian frame, sourced" ///
					4.treat_exp "Group 4: Western frame" ///
					5.treat_exp "Group 5: Western frame, sourced" ///
					authoritarian "Authoritarian beliefs" ///
					conspiracy_sum "Belief in conspiracy theory" ///
					know_sum "Political knowledge" ///
					pred_bundes_gov_r "Attitude twd German government" ///
					pred_Russia_r "Attitude twd Russia" ///
					2.treat_exp#c.know_sum  "T2 * Political knowledge" ///
					3.treat_exp#c.know_sum "T3 * Political knowledge" ///
					4.treat_exp#c.know_sum "T4 * Political knowledge" ///
					5.treat_exp#c.know_sum "T5 * Political knowledge" ///
					2.treat_exp#c.pred_bundes_gov_r "T2 * Attitude twd German government" ///
					3.treat_exp#c.pred_bundes_gov_r "T3 * Attitude twd German government" ///
					4.treat_exp#c.pred_bundes_gov_r "T4 * Attitude twd German government" ///
					5.treat_exp#c.pred_bundes_gov_r "T5 * Attitude twd German government" ///
					2.treat_exp#c.pred_Russia_r "T2 * Attitude twd Russia" ///
					3.treat_exp#c.pred_Russia_r "T3 * Attitude twd Russia" ///
					4.treat_exp#c.pred_Russia_r "T4 * Attitude twd Russia" ///
					5.treat_exp#c.pred_Russia_r "T5 * Attitude twd Russia" ///
					age "Age" ///
					female "Gender (female)" ///
					educ_secondary "Education dummy: Secondary education" ///
					educ_prof_high "Education dummy: Applied sciences high school" ///
					educ_acad_high "Education dummy: Academic high school" ///
					2.exp "Experiment dummy: NATO in Eastern Europe" ///
					3.exp "Experiment dummy: Democracy export to Ukraine" ///
					4.exp "Experiment dummy: Schengen treaty" ///
					5.exp "Experiment dummy: German media hold back facts to protect foreign law-breakers" ///
					6.exp "Experiment dummy: NATO commitment to support Turkey" ///
					7.exp "Experiment dummy: German government too lenient" ///
					8.exp "Experiment dummy: Russia Panama Papers" ///
					_cons "Constant") ///
		order(2.treat_exp 3.treat_exp 4.treat_exp 5.treat_exp authoritarian know_sum conspiracy_sum 2.treat_exp#c.know_sum 3.treat_exp#c.know_sum 4.treat_exp#c.know_sum 5.treat_exp#c.know_sum pred_bundes_gov_r 2.treat_exp#c.pred_bundes_gov_r 3.treat_exp#c.pred_bundes_gov_r 4.treat_exp#c.pred_bundes_gov_r 5.treat_exp#c.pred_bundes_gov_r pred_Russia_r 2.treat_exp#c.pred_Russia_r 3.treat_exp#c.pred_Russia_r 4.treat_exp#c.pred_Russia_r 5.treat_exp#c.pred_Russia_r age female educ_secondary educ_prof_high educ_acad_high 2.exp 3.exp 4.exp 5.exp 6.exp 7.exp 8.exp)  ///
		transform(ln*: exp(@) exp(@)) ///
		eqlabels("" "sd(Respondent)" "sd(Residual)", none) 
